package com.googlecode.aleverr.yafotkiclient.api;

import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.xpath.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;

public class AlbumCollection extends AbstractCollection<Album> {

    private AlbumCollection() {
    }

    @Override
    protected Album processEntry(Node entryNode) {
        return Album.fromEntryNode(entryNode);   
    }
    
    public static AlbumCollection fromUrl(String address, String accessToken) {
        AlbumCollection result = new AlbumCollection();
        result.processUrl(address, accessToken);
        return result;
    }
}
